package org.jeecg.modules.flowable.common.fs;

/**
 * Title:  资源文件
 * Desc:  <br>
 * Date: 5/21/22 8:50 AM <br>
 * Company: 联通（辽宁）产业互联网有限公司 <br>
 *
 * @author zxd
 * @version 1.0.0
 */
public class FsDataResult extends FsData {
    /**
     * 文件大小单位（字节）
     */
    private int size;
    /**
     * 原始文件名
     */
    private String oriFileName;
    /**
     * 文件名
     */
    private String fileName;

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public String getOriFileName() {
        return oriFileName;
    }

    public void setOriFileName(String oriFileName) {
        this.oriFileName = oriFileName;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((fileName == null) ? 0 : fileName.hashCode());
        result = prime * result + ((oriFileName == null) ? 0 : oriFileName.hashCode());
        result = prime * result + size;
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        FsDataResult other = (FsDataResult) obj;
        if (fileName == null) {
            if (other.fileName != null)
                return false;
        } else if (!fileName.equals(other.fileName))
            return false;
        if (oriFileName == null) {
            if (other.oriFileName != null)
                return false;
        } else if (!oriFileName.equals(other.oriFileName))
            return false;
        if (size != other.size)
            return false;
        return true;
    }

}
